<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>去除字符串中的html代码</title>
</head>
<body>
<script>
const removeHTML = (str = '') => str.replace(/<[\/\!]*[^<>]*>/ig, '')
console.log(removeHTML('<h1>哈哈哈哈<呵呵呵</h1>')) // 哈哈哈哈<呵呵呵
var str = 'dasda';
console.log((str && str.length) > 5)
</script>
</body>
</html>